package org.thanos.demo;

import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.thanos.demo.aop.ValidatePermission;

@RestController
public class DemoController {

    @GetMapping("/")
    @ValidatePermission(responseIndex = 0, tokenIndex = 1)
    public String test(ServerHttpResponse response, @RequestParam(value = "token",required = false) String token) {
        return "hello world";
    }
}
